package com.liteng.living;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;

/**
 * Created by 磁磁帅 on 2017/6/28.
 * 描述：
 */
public class Main2Activity extends Activity {
    private EditText editText;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);

        editText = (EditText) findViewById(R.id.textView);
        findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                String s = editText.getText().toString();
                if (!TextUtils.isEmpty(s)) {
                    Intent intent = new Intent(Main2Activity.this, MyVideoViewActivity.class);
                    intent.putExtra("stream_addr", s);
                    startActivity(intent);
                }
            }
        });
    }
}
